SWSPI
 
General Info
Properties
Methods
Events
Typical Usage



Embedded Beans
CPU Beans
About Beans
Bean Categories



 
 Bean SWSPI
 
Software synchronous serial communication

Typical usage of the bean in user's code.

Typical Usage:

Required bean name is "SPI1".
This example sends zeros repeatedly until it receives a character with code 13 from the slave.
 MAIN.C

byte ch;
byte err;
void main(void)
{
  do {
    SPI1_SendChar(0);          // Send zero
    err = SPI1_RecvChar(&ch);  // Get received char
    
  /* Do until it receives char with code 13 */ 
  } while ( (err != ERR_OK) || (ch != 13) );
    :
}

For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.


©1997-2004, UNIS, Ltd.